import { createRouter, createWebHistory, createWebHashHistory, RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: '默认路径',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    meta: { title: 'login' },
    component: () => import('@/views/login/index.vue')
  },
  {
    path: '/home',
    name: "home",
    meta: { title: 'home' },
    redirect: '/chat1',
    component: () => import("@/views/home/index.vue"),
    children: [
     {
        path: "/chat1",
        name:"chat1",
        meta: { title: "chat1", mark: "*:*:*" ,isMeun:"1", icon:"#icon-wodericheng-" },
        component: () => import("@/views/home/chat1/index.vue")
      },
      {
        path: '/chat2',
        name: 'chat2',
        meta: { title: 'chat2',icon: 'icon-tianxuangouren' },
        component: () => import('@/views/home/chat2/index.vue')
      },
      {
        path: '/chat3',
        name: 'chat3',
        meta: { title: 'chat3',icon: 'icon-tianxuangouren' },
        component: () => import('@/views/home/chat3/index.vue')
      },
      
      
    ]
  },
  {
    path: '/collection',
    name: 'collection',
    meta: { title: 'collection', icon: 'icon-shoucang1' },
    component: () => import('@/views/collection/index.vue'),
    // children: [
    //   {
    //     path: "/chat1",
    //     name:"chat1",
    //     meta: { title: "chat1", mark: "*:*:*" ,isMeun:"1", icon:"#icon-wodericheng-" },
    //     component: () => import("@/views/home/chat1/index.vue")
    //   },
    //   {
    //     path: '/chat2',
    //     name: 'chat2',
    //     meta: { title: 'chat2',icon: 'icon-tianxuangouren' },
    //     component: () => import('@/views/home/chat2/index.vue')
    //   },
    // ]
  },
  
]

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes
})

export default router
